Technical Q&A OPS21
dlsDelta field in PRAM's time zone MachineLocation record


Q: How is the dlsDelta field in PRAM's time zone MachineLocation record used and set?

A: The high bit (bit 7) of the dlsDelta field represents the current state of daylight savings time. If daylight savings time is in effect, then bit 7 of dlsDelta is set; if daylight savings time is not in effect, then bit 7 is clear. The other 7 bits (bits 0 through 6) of dlsDelta are reserved for future use by Apple. Thus, it's important that you preserve its current value if you ever use WriteLocation to set the value of gmtDelta. See the description of the WriteLocation routine in "WorldWide Development: Guide to System Software," available on the latest Developer CD for details on getting and setting gmtDelta while leaving dlsDelta intact. In short, the code looks like this:



VAR
    myLocation:     Location;
    myGMTDelta:     LongInt;
    tempSignedByte: SignedByte;
    :
    tempSignedByte := myLocation.dlsDelta;
    myLocation.gmtDelta := myGMTDelta;
    myLocation.dlsDelta := tempSignedByte;


[Mar 26 2001]


Developer Documentation | Technical Notes | Development Kits | Sample Code